package com.nuoniu.sibanyun.entity.production;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableField;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * MRP运算主表明细
 * </p>
 *
 * @author 小啊刚
 * @since 2023-05-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ma_mrp_operation_detail")
@ApiModel(value="MaMrpOperationDetail对象", description="MRP运算主表明细")
public class MaMrpOperationDetail extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "MRP运算主表id")
    @TableField("order_id")
    private Integer orderId;

    @ApiModelProperty(value = "生产部门id")
    @TableField("office_id")
    private Integer officeId;

    @ApiModelProperty(value = "生产部门名称")
    @TableField("office_name")
    private String officeName;

    @ApiModelProperty(value = "存货id")
    @TableField("inventory_id")
    private Integer inventoryId;

    @ApiModelProperty(value = "存货名称")
    @TableField("inventory_name")
    private String inventoryName;

    @ApiModelProperty(value = "存货编码")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "物料描述")
    @TableField("inventory_descript")
    private String inventoryDescript;

    @ApiModelProperty(value = "规格型号")
    @TableField("inventory_specification")
    private String inventorySpecification;

    @ApiModelProperty(value = "bomID")
    @TableField("bom_Id")
    private Integer bomId;

    @ApiModelProperty(value = "bom名称")
    @TableField("bom_name")
    private String bomName;

    @ApiModelProperty(value = "bom编码")
    @TableField("bom_version")
    private String bomVersion;

    @ApiModelProperty(value = "需求日期")
    @TableField("delivery_date")
    private LocalDate deliveryDate;

    @ApiModelProperty(value = "计划开工日期")
    @TableField("plan_begin_date")
    private LocalDate planBeginDate;

    @ApiModelProperty(value = "计划完工日期")
    @TableField("plan_end_date")
    private LocalDate planEndDate;

    @ApiModelProperty(value = "生产提前期")
    @TableField("production_lead_time")
    private String productionLeadTime;

    @ApiModelProperty(value = "单计量ID")
    @TableField("unit_id")
    private Integer unitId;

    @ApiModelProperty(value = "计量单位组ID")
    @TableField("unit_group_id")
    private Integer unitGroupId;

    @ApiModelProperty(value = "主计量ID")
    @TableField("base_unit")
    private Integer baseUnit;

    @ApiModelProperty(value = "主计量名称")
    @TableField("base_unit_name")
    private String baseUnitName;

    @ApiModelProperty(value = "计划数量（计划数量_主计量）")
    @TableField("base_quantity")
    private BigDecimal baseQuantity;

    @ApiModelProperty(value = "调整比例%")
    @TableField("adjust_rate")
    private BigDecimal adjustRate;

    @ApiModelProperty(value = "调整数量")
    @TableField("adjust_quantity")
    private String adjustQuantity;

    @ApiModelProperty(value = "运算数量")
    @TableField("operation_number")
    private BigDecimal operationNumber;

    @ApiModelProperty(value = "辅计量ID")
    @TableField("sub_unit")
    private Integer subUnit;

    @ApiModelProperty(value = "辅计量名称")
    @TableField("sub_unit_name")
    private String subUnitName;

    @ApiModelProperty(value = "数量（辅计量）")
    @TableField("sub_quantity")
    private BigDecimal subQuantity;

    @ApiModelProperty(value = "换算率")
    @TableField("unit_exchange_rate")
    private BigDecimal unitExchangeRate;

    @ApiModelProperty(value = "销售订单详情ID")
    @TableField("sale_order_detail_id")
    private Long saleOrderDetailId;

    @ApiModelProperty(value = "来源单id")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "客户ID")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "供应商ID")
    @TableField("supplier_id")
    private Integer supplierId;

    @ApiModelProperty(value = "供应商名称")
    @TableField("supplier_name")
    private String supplierName;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "来源单据日期")
    @TableField("source_voucher_date")
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "来源明细ID")
    @TableField("source_detail_id")
    private Integer sourceDetailId;

    @ApiModelProperty(value = "业务计划（1.采购，2.自制，3.委外，4.调拨）")
    @TableField("bussess_plan")
    private Integer bussessPlan;

    @ApiModelProperty(value = "下达状态(1.未下达,2.部份下达,3.已下达)")
    @TableField("release_state")
    private Integer releaseState;

    @ApiModelProperty(value = "仓库ID")
    @TableField("warehouse_id")
    private Integer warehouseId;

    @ApiModelProperty(value = "仓库名称")
    @TableField("warehouse_name")
    private String warehouseName;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "累计执行数量")
    @TableField("cum_execute_quantity")
    private BigDecimal cumExecuteQuantity;

    @ApiModelProperty(value = "排产状态")
    @TableField("scheduling_status")
    private Integer schedulingStatus;

    @ApiModelProperty(value = "需求优先级")
    @TableField("demand_priority")
    private Integer demandPriority;

    @ApiModelProperty(value = "下达数量")
    @TableField("released_quantity")
    private Integer releasedQuantity;


}
